
#set(webuploader = true)
#set(jsmind = true)
#set(jstree = true)


#@mgtlayout()
#define main()
#set(NAME = '模型管理')

<div class="r-row r-rsps">
  <div class="r-col-8">
    <div class="r-row r-rsps">
      <div class="r-col-3 g-page-title">#(NAME)</div>
      <div class="r-col-9">
        <!-- 搜索区 -->
      </div>
    </div>
    <div class="r-row r-rsps">
      <!-- 数据操作区 -->
      <div class="r-col-12">
        <button type="button" data-r-opts="{icon:'fa-plus'}" class="r-ui" id="btnAddModel">新建</button>
        <button type="button" data-r-opts="{icon:'fa-times'}" class="r-ui" id="btnRemoveModel">删除</button>
        <button type="button" class="r-ui"  id="btnpowImport">导入</button>
        <button type="button" class="r-ui r-hide"  id="exportModel">导出</button>
      </div>
    </div>
  </div>
</div>
<div class="r-row r-rsps" style="position: absolute;right: 25%;left:2%;top:110px;bottom: 0;overflow-y: auto;width:98%;border-top: 1px solid #1abc9c">
  <div class="r-col-12">
  <div id="jsmind_container" style="position: static"></div>
  </div>
</div>

<div class="r-window" id="wndModelEdit">
  <form id="frmModelEdit">
  </form>
</div>

<div class="r-window" id="winDataModelField">
  <input type="hidden"  id="hidPartyId" name="partylId"/>
  <input type="hidden"  id="hidPartySize" name="PARTY_SIZE"/>
  <input type="hidden"  id="hdnModelName" />
  <div class="r-clearfix r-p-rl r-m-t">
    <div class="r-f-l">
      <input type="picker" id="pkState" class="r-ui" data-r-opts="{label:'字段状态',labelStyle:'inline'}" style="width:150px;" />
      <input type="text" id="txtAttrNum" class="r-ui" data-r-opts="{label:'字段序号',labelStyle:'inline'}" style="width:150px;" />
    </div>
    <div class="r-f-r">
      <button type="button" class="r-ui" id="btnSetUDMKey">设置主键</button>
    </div>
  </div>
  <div class="r-row">
    <div class="r-col-12 r-m-t-sm">
      <div id="grd"></div>
    </div>
  </div>
</div>



<div class="r-window" id="winModelUDMKeyEdit">
  <form id="frmModelUDMKeyEdit">
    <div class="r-row">
      <div class="g-group r-col-12">
        <label>标题说明</label> <input type="text" class="r-ui" id="txtUDMKeyTitle" name="attrib_01" data-r-opts="{minlength:1,maxlength:100}">
      </div>
    </div>
    <div class="r-row">
      <div class="g-group r-col-12">
        <label>可选字段</label>
        <input type="picker" class="r-ui" id="attribUDMKeyTypePicker"/>
      </div>
    </div>
  </form>
</div>



<div id="winDataModelUDMKey" class="r-window" >
  <form id="frmDataModelUDMKey">
    <div class="r-row">
      <div class="g-group r-col-12" style="padding-left: 10px;padding-top: 10px;padding-bottom: 10px;">
        <button type="button" class="r-ui" id="btnSetUDMKeyAdd">新增</button>
      </div>
      </div>
    <div class="r-row">
      <div class="r-col-12 r-m-t-sm">
        <div id="gridUDMKey"></div>
      </div>
    </div>
  </form>
</div>

<!-- 万能导入窗体 -->
<div class="r-window" id="wndPowerfulImport">
  <form class="r-set r-p" onsubmit="return false;" id="frmPowerfulImport">
    <div class="r-row">
      <div class="r-col-6">
        <div class="r-label">模型表</div>
        <input type="picker" class="r-ui" id="pkrModelTable" name="modelId"/>
      </div>
      <div class="r-col-6">
        <div class="r-label">选择主键</div>
        <input type="picker" class="r-ui" id="pkrUdkey" name="umdKey"/>
      </div>
    </div>
    <div class="r-row">
      <div class="r-row">
        <div class="r-col-12">
          <div class="r-label">动态表单</div>
          <input type="picker" class="r-ui" id="pkrFnForm" name="fnformid"/>
        </div>
      </div>
    </div>

    <div class="r-row">
      <div class="r-col-6">
        <div class="r-label">更新规则</div>
        <input type="picker" class="r-ui" id="pkrUpdateRule" name="updateRule"/>
      </div>
      <div class="r-col-6">
        <div class="r-label">上传数据</div>
        <div id="powImportUploader">

        </div>
      </div>
    </div>

  </form>
</div>
<div class="r-window" id="wndPowerfulImportjd">
  <div class="layui-progress layui-progress-big" lay-showpercent="true"  lay-filter="imp">
    <div class="layui-progress-bar layui-bg-red" lay-percent="0%" style="width: 0%;"></div>
  </div>


</div>
<!-- 万能导出 -->
<div class="r-window" id="wndPowerfulExport">
  <div class="r-row r-m-t-sm">
    <div class="r-col-12">
      <form  id="searchFrm" onsubmit="return false;">
        <table style="float: right;">
          <tr>
            <td style="padding-left: 8px;">
              <input type="picker" style="width: 150px;"  class="r-ui" id="pkrModelTableExport"/>
            </td>
            <td style="padding-left: 5px;"><button type="button" class="r-ui" id="btnExportData">导出数据</button></td>
          </tr>
        </table>
      </form>
    </div>
  </div>
  <div style="padding-top: 10px; height: 100px;">
    <table id="tableListExport"></table>
  </div>
</div>


#end

#define css()
<style type="text/css">
  .jsmind-inner {
    position: static;
  }
</style>
#(yx.css("/lib/ui/css/bootstrap.min.css"))

#(yx.css("/lib/layui/css/layui.css"))
#end

#define js()
#(yx.js("/lib/jquery.ext.js"))
#(yx.js("/script/pc/sysmgt/infrastructure/datamodel/data-model.js"))
#(yx.js("/lib/bootstrap/js/bootstrap.min.js"))

#(yx.js("/lib/layui/layui.all.js"))
#end